﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace JzSport.Api.Params
{
    public class GetActivityList4OtherParams : IActionParams
    {
        /// <summary>
        /// 1:已参加,2:已发起
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 页码，从0开始
        /// </summary>
        public int Page { get; set; }

        public int TargetId { get; set; }

        public void ParseQueryString(HttpRequest request)
        {
            this.Type = Convert.ToInt32(request.QueryString["op:type"]);
            this.Page = Convert.ToInt32(request.QueryString["op:page"]);
            this.TargetId = Convert.ToInt32(request.QueryString["op:TargetId"]);
        }

        public void ParseForm(HttpRequest request)
        {
            this.Type = Convert.ToInt32(request.Form["op:type"]);
            this.Page = Convert.ToInt32(request.Form["op:page"]);
            this.TargetId = Convert.ToInt32(request.Form["op:TargetId"]);
        }
    }
}
